package com.huilian.iotbox.admin.wap.dao;

import com.huilian.iotbox.data.dto.DisplayRackItemDto;
import com.huilian.iotbox.data.po.DisplayRackItem;
import com.huilian.iotbox.data.vo.DisplayRackItemVo;
import com.huilian.iotbox.data.vo.DisplayRackVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DisplayRackItemDao {

    List<DisplayRackItemVo> findDisplayRackItemByDeviceId(DisplayRackItemDto displayRackItemDto);

    List<DisplayRackItemVo> findAllByDeviceId(DisplayRackItemDto displayRackItemDto);
    DisplayRackItemVo findDisplayRackItem(DisplayRackItemDto displayRackItemDto);

    Integer deleteByDeviceIdAndFreightLane(DisplayRackItemDto displayRackItemDto);

    Integer deleteByDeviceId(DisplayRackItemDto displayRackItemDto);

    Integer insert(DisplayRackItem displayRackItem);

    Integer update(DisplayRackItem displayRackItem);


    Integer totalNumberOfBoundProducts(@Param("commodityId") Long commodityId,@Param("merchantStoreId") Integer merchantStoreId,@Param("deviceId") Integer deviceId);

    List<DisplayRackItemVo> findDisplayRackItemByDisplayRackId(@Param("displayRackId") Long displayRackId);


    List<DisplayRackItemVo> findAisleByDeviceId(DisplayRackItemDto displayRackItemDto);

    Integer updateByIdAndUserId(DisplayRackItemDto displayRackItemDto);

    Integer updateOffTheShelvesById(DisplayRackItemDto displayRackItemDto);

    List<DisplayRackItemVo> findCommodityByHierarchy(DisplayRackItemDto displayRackItemDto);

    Integer updateOffEnabledById(DisplayRackItemDto displayRackItemDto);

    Integer updateAliasById(DisplayRackItemDto displayRackItemDto);

    DisplayRackItemVo findById(DisplayRackItemDto displayRackItemDto);

    DisplayRackItemVo findOutOfStockByDeviceId(DisplayRackItemDto displayRackItemDto);

    /**
     * 缺货盘点
     */
    List<DisplayRackItemVo> findTakeStockOfOutOfStock(DisplayRackItemDto displayRackItemDto);

    int updateRestoreByDisplayRackId(Long displayRackId);

    List<DisplayRackItem> findAllDisplayRackItemByCondition(DisplayRackItem displayRackItemCondition);

    DisplayRackItem findOneDisplayRackItemByCondition(DisplayRackItem displayRackItemCondition);

    DisplayRackVo findDisplayRackAndItemList(DisplayRackItemDto displayRackItemDto);

    int commodityIdSetNullById(Long id);

    List<DisplayRackItemVo> findCommodityLackStockByDeviceId(DisplayRackItemDto displayRackItemDto1);

    DisplayRackItemVo findOutOfStockByUserId(@Param("displayRackItemDto") DisplayRackItemDto displayRackItemDto);

    int updateOneById(DisplayRackItemVo displayRackItemVo);

    List<DisplayRackItemVo> findDisplayRackitemList(DisplayRackItemDto displayRackItemDto);
}
